package com.itheima.tlias.service.impl;


import com.itheima.tlias.mapper.EmpLogMapper;
import com.itheima.tlias.pojo.EmpLog;
import com.itheima.tlias.service.EmpLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class EmpLogServiceImpl implements EmpLogService {
    @Resource
    private EmpLogMapper empLogMapper;

    /**
     * 插入一条员工操作日志
     *
     * @param empLog 员工操作日志
     */
    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void insert(EmpLog empLog) {
        empLogMapper.insert(empLog);
    }
}
